if (process.env.NODE_ENV !== 'production') {
  const copyText = `

---------------------
作者：shinn
链接：${location.href}
来源：http://localhost
商业转载请联系作者获得授权，非商业转载请注明出处。`

  document.addEventListener('copy', (e: any) => {
    if (!window.getSelection) {
      return
    }
    const content = (window as any).getSelection().toString();

    e.clipboardData.setData('text/plain', content + copyText);
    e.clipboardData.setData('text/html', content + copyText);
    e.preventDefault();
  }, false);
}